<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%><%@page import="java.util.Map"%>

<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>未审核订单信息列表</title>
</head>
<script type="text/javascript">
function del(oid){
	if(confirm("确定删除该订单吗？")){
		window.location.href="<%=request.getContextPath()%>/orderDelForcheck.action?oid="+oid;
	}
	
}

function upd(oid){
	window.location.href="<%=request.getContextPath()%>/orderUpdSel.action?oid="+oid;
}

function checkOrder(oid){
	if(confirm("审核通过？ ")){
		window.location.href="<%=request.getContextPath()%>/orderCheck.action?oid="+oid;
	}
}
</script>
<body>
<table width="760" border="0" cellpadding="0" cellspacing="0" >
  <tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
      <tr>
        <td class="MainBody_title"><hello:forValue type="title" /></td>
      </tr>
      <tr>
        <td class="MainBody_body" >
        <table border="0" cellpadding="0" cellspacing="0"  class="MainBody_table">
           <tr>
				<th nowrap="nowrap">序号</th>
				<th nowrap="nowrap">订单编号</th>
				<th nowrap="nowrap">订单名称</th>
				<th nowrap="nowrap">客户名称</th>
				<th nowrap="nowrap">下单日期</th>
				<th nowrap="nowrap">交货日期</th>
				<th nowrap="nowrap">结算日期</th>
				<th nowrap="nowrap">状态</th>
				<th nowrap="nowrap">操作</th>
			</tr>

             	<% 
             	if(request.getAttribute("list")!=null&&!((List)request.getAttribute("list")).isEmpty()){
             		List list = (List)request.getAttribute("list");
             		for(int i=0;i<list.size();i++){
             			Map c = (Map)list.get(i);
             			request.setAttribute("c",c);
             	 %>
			<tr>
				<td align="center" nowrap="nowrap"><%=i+1 %></td>
				<td align="center" nowrap="nowrap"><%=c.get("orderid") %></td>
				<td align="center" nowrap="nowrap"><a href="<%=request.getContextPath()%>/orderSel.action?cid=<%=c.get("cId") %>&oid=<%=c.get("oid") %>" title="订单详细信息"><%=c.get("name") %></a></td>
				<td align="center" nowrap="nowrap"><%=c.get("clientName") %></td>
				<td align="center" nowrap="nowrap"><%=c.get("orderTime") %></td>
				<td align="center" nowrap="nowrap"><%=c.get("finishTime") %></td>
				<td align="center" nowrap="nowrap"><%=c.get("balanceTime") %></td>
				<td align="center" nowrap="nowrap"><%=c.get("status").equals("未审核")?"<a href='#' onclick='return checkOrder(\""+c.get("orderid")+"\")'>[审核]</a>":c.get("status") %></td>
				<td align="center" nowrap="nowrap">
				<a href="#" title="修改订单信息" onclick = "return upd('<%=c.get("oid")%>')">[修改]</a>
				<a href="#" title="删除该订单" onclick = "return del('<%=c.get("oid") %>');">[删除]</a>
				</td> 
			</tr>
			<%}//for end
             }else{%>
		<tr>
			<td align="center" colspan="9">暂时没有您可以浏览的数据</td>
		</tr>
			<%
				} %>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="MainBody_fun">
            <tr>
              <td>
               <hello:AllPage />
			  </td>
            </tr>
          </table>
          </td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>